package com.css.openapi.BO;

import com.css.common.core.annotation.ValiCode;
import com.css.common.core.enums.YwlxEnum;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;


/*
 *扩展属性
 */
@Data
public class ExtraV2VO<T> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 0101 商超
     * 0201	出租车
     * 0202	旅客运输
     * 0301	停车场
     * 0401	旅游景点
     */
    @ValiCode(vals= YwlxEnum.class,message = "业务类型不合法")
    @ApiModelProperty("业务类型")
    @JsonProperty(value = "businessType")
    private String businessType;

    @ApiModelProperty("购买方统一社会信用代码/纳税人识别号/身份证件号码")
    @JsonProperty(value = "gmfnsrsbh")
    private String gmfnsrsbh;

    @NotBlank(message = "购买方纳税人名称不能为空")
    @ApiModelProperty("购买方纳税人名称")
    @JsonProperty(value = "gmfnsrmc")
    private String gmfnsrmc;

    @ApiModelProperty("购买方地址")
    @JsonProperty(value = "gmfdz")
    private String gmfdz;

    @ApiModelProperty("购买方电话")
    @JsonProperty(value = "gmfdh")
    private String gmfdh;

    @ApiModelProperty("购买方开户行")
    @JsonProperty(value = "gmfkhh")
    private String gmfkhh;

    @ApiModelProperty("购买方账号")
    @JsonProperty(value = "gmfzh")
    private String gmfzh;

    @Pattern(regexp = "[YN]",message = "购买方自然人标志不合法")
    @ApiModelProperty("购买方自然人标志")
    @JsonProperty(value = "gmfzrrbz")
    private String gmfzrrbz;

    @NotBlank(message = "开票结果通知地址不能为空")
    @ApiModelProperty("开票结果通知地址")
    @JsonProperty(value = "callBackUrl")
    private String callBackUrl;

    @NotBlank(message = "商户订单号不能为空")
    @ApiModelProperty("商户订单号")
    @JsonProperty(value = "merchantOrderId")
    private String merchantOrderId;

    @ApiModelProperty("备注")
    @JsonProperty(value = "bz")
    private String bz;

    @ApiModelProperty("订单类型")
    @JsonProperty(value = "ddlx")
    private String ddlx;

    @ApiModelProperty("发票票种（01:数电专，02：数电普）")
    @JsonProperty(value = "fppz")
    private String fppz="02";

    @Valid
    @NotEmpty(message = "订单明细不能为空")
    @ApiModelProperty("订单明细")
    @JsonProperty(value = "ddmx")
    private List<OrderTymxV2Vo> ddmx;

    @ApiModelProperty("停车场扩展信息")
    @JsonProperty(value = "tcckzxx")
    private TcckzxxVo tcckzxx;

    //用于旅客运输
    @ApiModelProperty("订单明细")
    @JsonProperty(value = "details")
    private List<TaxiDetailVO> details;
    @ApiModelProperty("出行人信息")
    @JsonProperty(value = "passengers")
    private List<PassengerVO> passengers;
}
